package com.demo2do.fms.entity.business.balance;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.demo2do.fms.entity.business.shipment.DispatchOrder;
import com.demo2do.fms.entity.business.shipment.TransportCost;

/**
 * 已报销派车单实际内部加油量
 *
 * @author Ark
 *
 */
@Entity
@Table(name = "TBL_TRUCK_REIMBURSE_OIL")
public class ReimburseOil {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "generator")
    @SequenceGenerator(name = "generator", sequenceName = "HIBERNATE_SEQUENCE", allocationSize = 1)
    private Long id;
    
    /** 所属公司 */
    private Long organizationId;
    
    /** 派车单id */
    private Long dispatchOrderId;
    
    /** 派车单号 */
    private String dispatchOrderCode;
    
    /** 车辆id */
    private Long vehicleId;
    
    /** 主驾 */
    private Long mainDriverId;
    
    /** 第一副驾 */
    private Long firstViceDriverId;
    
    /** 加油类型 */
    private Long oilTypeId;
    
    /** 加油量*/
    private BigDecimal oilUsage;
    
    /** 内部加油量*/
    private BigDecimal internalOilUsage;
    
    /** 内部加油变现量 */
    private BigDecimal internalOilUsageCompen;
    
    /** 报销人 */
    private String reimburseOperator;
    
    /** 报销号 */
    private String reimburseCode;
    
    /** 报销日期 */
    private Date reimburseDate;
    
    /** 更新日期 */
    private Date updatedDate;

    /*============= added by Leon on 2019/8/22 for FMS_19_CR_02 =============*/
    private BigDecimal internalOilPrice;
    /*============= end of added by Leon on 2019/8/22 for FMS_19_CR_02 =============*/


    /**
     * The default constructor
     */
    public ReimburseOil() {
        
    }

    /**
     * 
     * @param order
     * @param cost
     * @param reimburseOperator
     * @param reimburseDate
     */
    public ReimburseOil(DispatchOrder order, TransportCost cost, String reimburseOperator, Date reimburseDate) {
        this.organizationId = order.getOrganizationId();
        this.dispatchOrderId = order.getId();
        this.dispatchOrderCode = order.getCode();
        this.vehicleId = order.getVehicleId();
        this.mainDriverId = order.getMainDriverId();
        this.firstViceDriverId = order.getFirstViceDriverId();
        this.oilTypeId = cost.getOilTypeId();
        this.oilUsage = cost.getOilUsage();
        this.internalOilUsage = cost.getInternalOilUsage();
        this.internalOilUsageCompen = cost.getInternalOilUsageCompen();
        this.reimburseOperator = reimburseOperator;
        this.reimburseCode = order.getReimburseCode();
        this.reimburseDate = reimburseDate;
        this.updatedDate = new Date();
        this.internalOilPrice = cost.getInternalOilPrice();
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the organizationId
     */
    public Long getOrganizationId() {
        return organizationId;
    }

    /**
     * @return the dispatchOrderId
     */
    public Long getDispatchOrderId() {
        return dispatchOrderId;
    }

    /**
     * @return the dispatchOrderCode
     */
    public String getDispatchOrderCode() {
        return dispatchOrderCode;
    }

    /**
     * @return the vehicleId
     */
    public Long getVehicleId() {
        return vehicleId;
    }

    /**
     * @return the mainDriverId
     */
    public Long getMainDriverId() {
        return mainDriverId;
    }

    /**
     * @return the firstViceDriverId
     */
    public Long getFirstViceDriverId() {
        return firstViceDriverId;
    }

    /**
     * @return the oilTypeId
     */
    public Long getOilTypeId() {
        return oilTypeId;
    }

    /**
     * @return the oilUsage
     */
    public BigDecimal getOilUsage() {
        return oilUsage;
    }

    /**
     * @return the internalOilUsage
     */
    public BigDecimal getInternalOilUsage() {
        return internalOilUsage;
    }

    /**
     * @return the internalOilUsageCompen
     */
    public BigDecimal getInternalOilUsageCompen() {
        return internalOilUsageCompen;
    }

    /**
     * @return the reimburseOperator
     */
    public String getReimburseOperator() {
        return reimburseOperator;
    }

    /**
     * @return the reimburseCode
     */
    public String getReimburseCode() {
        return reimburseCode;
    }

    /**
     * @return the reimburseDate
     */
    public Date getReimburseDate() {
        return reimburseDate;
    }

    /**
     * @return the updatedDate
     */
    public Date getUpdatedDate() {
        return updatedDate;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param organizationId the organizationId to set
     */
    public void setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
    }

    /**
     * @param dispatchOrderId the dispatchOrderId to set
     */
    public void setDispatchOrderId(Long dispatchOrderId) {
        this.dispatchOrderId = dispatchOrderId;
    }

    /**
     * @param dispatchOrderCode the dispatchOrderCode to set
     */
    public void setDispatchOrderCode(String dispatchOrderCode) {
        this.dispatchOrderCode = dispatchOrderCode;
    }

    /**
     * @param vehicleId the vehicleId to set
     */
    public void setVehicleId(Long vehicleId) {
        this.vehicleId = vehicleId;
    }

    /**
     * @param mainDriverId the mainDriverId to set
     */
    public void setMainDriverId(Long mainDriverId) {
        this.mainDriverId = mainDriverId;
    }

    /**
     * @param firstViceDriverId the firstViceDriverId to set
     */
    public void setFirstViceDriverId(Long firstViceDriverId) {
        this.firstViceDriverId = firstViceDriverId;
    }

    /**
     * @param oilTypeId the oilTypeId to set
     */
    public void setOilTypeId(Long oilTypeId) {
        this.oilTypeId = oilTypeId;
    }

    /**
     * @param oilUsage the oilUsage to set
     */
    public void setOilUsage(BigDecimal oilUsage) {
        this.oilUsage = oilUsage;
    }

    /**
     * @param internalOilUsage the internalOilUsage to set
     */
    public void setInternalOilUsage(BigDecimal internalOilUsage) {
        this.internalOilUsage = internalOilUsage;
    }

    /**
     * @param internalOilUsageCompen the internalOilUsageCompen to set
     */
    public void setInternalOilUsageCompen(BigDecimal internalOilUsageCompen) {
        this.internalOilUsageCompen = internalOilUsageCompen;
    }

    /**
     * @param reimburseOperator the reimburseOperator to set
     */
    public void setReimburseOperator(String reimburseOperator) {
        this.reimburseOperator = reimburseOperator;
    }

    /**
     * @param reimburseCode the reimburseCode to set
     */
    public void setReimburseCode(String reimburseCode) {
        this.reimburseCode = reimburseCode;
    }

    /**
     * @param reimburseDate the reimburseDate to set
     */
    public void setReimburseDate(Date reimburseDate) {
        this.reimburseDate = reimburseDate;
    }

    /**
     * @param updatedDate the updatedDate to set
     */
    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    public BigDecimal getInternalOilPrice() {
        return internalOilPrice;
    }

    public void setInternalOilPrice(BigDecimal internalOilPrice) {
        this.internalOilPrice = internalOilPrice;
    }
}
